import {isWeiXin} from "@/common/helper";
const siteinfo = require('../siteinfo.js')

if(siteinfo.uniacid){
	uni.setStorageSync('uniacid', siteinfo.uniacid);
}

// #ifdef H5
let localDoamin = window.location.host;
if (localDoamin.indexOf('localhost') != '-1' && localDoamin.indexOf('127.0.0.1') != '-1') {
	siteinfo.siteroot = 'https://' + localDoamin + '/app/index.php';
}
// #endif

let domain='';
if(siteinfo.iswe7){
	domain = siteinfo.siteroot.replace('/app/index.php', '/addons/ymq_zhnc/public/index.php');
}else{
	domain = siteinfo.siteroot.replace('/app/index.php', '');
}

//测试
export const baseUrl = domain

// #ifdef H5
export const platform = isWeiXin() ? 'official' : 'h5'
// #endif

// #ifdef MP-TOUTIAO
export const platform = 'byte'
// #endif

// #ifdef MP-WEIXIN
export const platform = 'wechat'
// #endif

// #ifdef APP-PLUS
export const platform = 'app'
// #endif